Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #19044 -- Allow get_success_url to access self.object in DeletionMixin #417

Closed
wants to merge 1 commit into from
Closed

Conversation

0x0badc0de
Copy link

generic_views tests passes

@mjtamlyn
Copy link
Member

mjtamlyn commented Oct 3, 2012

I don't think the get_success_url method needs to change - it seems a pretty odd change to me anyway. The change to delete looks good though and makes sense.

@0x0badc0de
Copy link
Author

Please take a look at https://code.djangoproject.com/ticket/19044
Change to get_success_url is necessary for example to redirect to object parent after its deletion

@charettes
Copy link
Member

IMHO you shouldn't refer to an URL this way, you should use the reverse_lazy function here.

I have to agree with @mjtamlyn about the changes of the get_success_url method. You just can't assume that the specified success_url should be formatted using the instance's __dict__.

@0x0badc0de
Copy link
Author

Why get_success_url of DeletionMixin cannot format url in the same way as get_success_url of ModelFormMixin in the same file?

@mjtamlyn
Copy link
Member

mjtamlyn commented Oct 3, 2012

Sorry, didn't realise it was a consistency thing. In that case the change should be there for consistency purposes, although I still think the feature smells ;)

@charettes
Copy link
Member

@0x0badc0de please forgive me, didn't notice that. I wonder if it's documented somewhere.

@apollo13
Copy link
Member

Needs tests as noted on the ticket.

@charettes
Copy link
Member

#663 has tests.

@charettes charettes closed this Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants